package com.qf.ayc.foster.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author BeautyFairy
 * @since 2024-02-20
 */
@Getter
@Setter
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Foster implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String username;

    private String petname;

    private String type;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date starttime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endtime;

    private Integer status;

    private String phone;

    @Override
    public String toString() {
        return "Foster{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", petname='" + petname + '\'' +
                ", type='" + type + '\'' +
                ", starttime=" + starttime +
                ", endtime=" + endtime +
                ", status=" + status +
                ", phone='" + phone + '\'' +
                '}';
    }
}
